﻿namespace calss_7_for语句练习
{
    internal class Program
    {
        static void Main(string[] args)
        {

            //题目：打印菱形图案

            int h;
            int p=5;

            for(int i = 1; i <= 5; i++)
            {
                if(i<=(p-1)/2||i>(p+1)/2)
                Console.Write(" ");
                else
                    Console.Write("*");



            }
            Console.Write('\n');
            for(int o = 1;o <= 5;o++)
            {
                if(o==2||o==4)
                    Console.Write("*");
                else
                    Console.Write(" ");



            }
            Console.Write('\n');
            for(int n = 1; n <= 5; n++)
            {
                Console.Write("*");

            }
            
            Console.Write('\n');
            for (int t = 1; t <= 5; t++)
            {
                if (t == 2 || t == 4)
                    Console.Write("*");
                else
                    Console.Write(" ");



            }
            Console.Write('\n');

            for (int v = 1; v <= 5; v++)
            {
                if (v <= (p - 1) / 2 || v > (p + 1) / 2)
                    Console.Write(" ");
                else
                    Console.Write("*");



            }







        }
    }
}
